using System;
using System.Drawing;
using System.Collections;
using System.ComponentModel;
using DevExpress.XtraReports.UI;
using Library.Business;

namespace HoaDonNuoc.Interface.BaoCao
{
    public partial class rpt_HoaDonNuoc : DevExpress.XtraReports.UI.XtraReport
    {
        public bool InCungMau
        {   get;set;    }
        public int Ngay
        { get; set; }
        public int Thang
        { get; set; }
        public int Nam
        { get; set; }
        public Cls_ThongTinGia_ChiTiet ThongTinGia_ChiTiet
        { set; get; }

        public rpt_HoaDonNuoc()
        {
            InitializeComponent();
        }
        private void rpt_HoaDonNuoc_BeforePrint(object sender, System.Drawing.Printing.PrintEventArgs e)
        {
            checkInCungMau();
            loadNgayThangNam();
            ganGiaTri_ThongTinGia();
        }
       
        public void checkInCungMau()
        {
            AnChu_Lien1();
            AnChu_Lien2();
            AnChu_Lien3();
            AnLine();
        }
        public void ganGiaTri_ThongTinGia()
        {
            l1_33.Text = String.Format(l1_33.Text, ThongTinGia_ChiTiet.ThueGTGT);
            l1_35.Text = String.Format(l1_35.Text, ThongTinGia_ChiTiet.Thue_1);
            l1_36.Text = String.Format(l1_36.Text, ThongTinGia_ChiTiet.Thue_2);
            //
            l2_62.Text = String.Format(l2_62.Text,ThongTinGia_ChiTiet.ThueGTGT);
            l2_65.Text = String.Format(l2_65.Text,ThongTinGia_ChiTiet.Thue_1);
            l2_67.Text = String.Format(l2_67.Text, ThongTinGia_ChiTiet.Thue_2);
            //
            l3_18.Text = String.Format(l3_18.Text, ThongTinGia_ChiTiet.ThueGTGT);
            l3_19.Text = String.Format(l3_19.Text, ThongTinGia_ChiTiet.Thue_1);
            l3_20.Text = String.Format(l3_20.Text, ThongTinGia_ChiTiet.Thue_2);
        }
        

        private void AnChu_Lien1()
        {
            if (!InCungMau)
            {
                l1_1.ForeColor = Color.White;
                l1_2.ForeColor = Color.White;
                l1_3.ForeColor = Color.White;
                l1_4.ForeColor = Color.White;
                l1_5.ForeColor = Color.White;
                l1_6.ForeColor = Color.White;
                l1_7.ForeColor = Color.White;
                l1_8.ForeColor = Color.White;
                l1_9.ForeColor = Color.White;
                l1_10.ForeColor = Color.White;
                l1_11.ForeColor = Color.White;
                l1_12.ForeColor = Color.White;
                l1_13.ForeColor = Color.White;
                l1_14.ForeColor = Color.White;
                l1_15.ForeColor = Color.White;
                l1_16.ForeColor = Color.White;
                l1_17.ForeColor = Color.White;
                l1_18.ForeColor = Color.White;
                l1_19.ForeColor = Color.White;
                l1_20.ForeColor = Color.White;
                l1_21.ForeColor = Color.White;
                l1_22.ForeColor = Color.White;
                l1_23.ForeColor = Color.White;
                l1_24.ForeColor = Color.White;
                l1_25.ForeColor = Color.White;
                l1_26.ForeColor = Color.White;
                l1_27.ForeColor = Color.White;
                l1_28.ForeColor = Color.White;
                l1_29.ForeColor = Color.White;
                l1_30.ForeColor = Color.White;
                l1_31.ForeColor = Color.White;
                l1_32.ForeColor = Color.White;
                l1_33.ForeColor = Color.White;
                l1_34.ForeColor = Color.White;
                l1_35.ForeColor = Color.White;
                l1_36.ForeColor = Color.White;
                l1_37.ForeColor = Color.White;
                l1_38.ForeColor = Color.White;
                l1_39.ForeColor = Color.White;
                l1_40.ForeColor = Color.White;
                l1_41.ForeColor = Color.White;
                l1_42.ForeColor = Color.White;
                l1_43.ForeColor = Color.White;
                l1_44.ForeColor = Color.White;
                l1_45.ForeColor = Color.White;
                l1_46.ForeColor = Color.White;
                l1_47.ForeColor = Color.White;

                // 
                l1_21.BorderColor = Color.White;
                l1_22.BorderColor = Color.White;
                l1_23.BorderColor = Color.White;
                l1_24.BorderColor = Color.White;
                l1_25.BorderColor = Color.White;
                l1_26.BorderColor = Color.White;
                l1_27.BorderColor = Color.White;
                l1_28.BorderColor = Color.White;
                l1_29.BorderColor = Color.White;
                l1_30.BorderColor = Color.White;
                l1_31.BorderColor = Color.White;
                l1_32.BorderColor = Color.White;
                l1_33.BorderColor = Color.White;
                l1_34.BorderColor = Color.White;
                l1_35.BorderColor = Color.White;
                l1_36.BorderColor = Color.White;
                l1_37.BorderColor = Color.White;
                l1_38.BorderColor = Color.White;
                l1_48.BorderColor = Color.White;
                l1_49.BorderColor = Color.White;
                l1_50.BorderColor = Color.White;
                l1_51.BorderColor = Color.White;
                l1_52.BorderColor = Color.White;
                l1_53.BorderColor = Color.White;
                l1_54.BorderColor = Color.White;
                l1_55.BorderColor = Color.White;
                l1_56.BorderColor = Color.White;
                l1_57.BorderColor = Color.White;
                l1_58.BorderColor = Color.White;
                l1_59.BorderColor = Color.White;
                l1_60.BorderColor = Color.White;
                l1_61.BorderColor = Color.White;
                l1_62.BorderColor = Color.White;
                l1_63.BorderColor = Color.White;
                l1_64.BorderColor = Color.White;
                l1_65.BorderColor = Color.White;
                l1_66.BorderColor = Color.White;
                l1_67.BorderColor = Color.White;
                l1_68.BorderColor = Color.White;
                l1_69.BorderColor = Color.White;
                l1_70.BorderColor = Color.White;
                l1_71.BorderColor = Color.White;
                l1_72.BorderColor = Color.White;
                l1_73.BorderColor = Color.White;
                l1_74.BorderColor = Color.White;
                l1_75.BorderColor = Color.White;
                l1_76.BorderColor = Color.White;
                l1_84.BorderColor = Color.White;
                l1_85.BorderColor = Color.White;
                l1_86.BorderColor = Color.White;
                l1_87.BorderColor = Color.White;
                l1_88.BorderColor = Color.White;
            }
        }
        private void AnChu_Lien2()
        {
            if (!InCungMau)
            {
                l2_1.ForeColor = Color.White;
                l2_2.ForeColor = Color.White;
                l2_3.ForeColor = Color.White;
                l2_4.ForeColor = Color.White;
                l2_5.ForeColor = Color.White;
                l2_6.ForeColor = Color.White;
                l2_7.ForeColor = Color.White;
                l2_8.ForeColor = Color.White;
                l2_9.ForeColor = Color.White;
                l2_10.ForeColor = Color.White;
                l2_11.ForeColor = Color.White;
                l2_12.ForeColor = Color.White;
                l2_13.ForeColor = Color.White;
                l2_14.ForeColor = Color.White;
                l2_15.ForeColor = Color.White;
                l2_16.ForeColor = Color.White;
                l2_17.ForeColor = Color.White;
                l2_18.ForeColor = Color.White;
                l2_19.ForeColor = Color.White;
                l2_20.ForeColor = Color.White;
                l2_21.ForeColor = Color.White;
                l2_22.ForeColor = Color.White;
                l2_23.ForeColor = Color.White;
                l2_24.ForeColor = Color.White;
                l2_25.ForeColor = Color.White;
                l2_26.ForeColor = Color.White;
                l2_27.ForeColor = Color.White;
                l2_33.ForeColor = Color.White;
                l2_39.ForeColor = Color.White;
                l2_45.ForeColor = Color.White;
                l2_51.ForeColor = Color.White;
                l2_57.ForeColor = Color.White;
                l2_62.ForeColor = Color.White;
                l2_63.ForeColor = Color.White;
                l2_65.ForeColor = Color.White;
                l2_67.ForeColor = Color.White;
                l2_69.ForeColor = Color.White;
                l2_71.ForeColor = Color.White;
                l2_73.ForeColor = Color.White;
                l2_74.ForeColor = Color.White;
                l2_75.ForeColor = Color.White;
                l2_76.ForeColor = Color.White;
                l2_77.ForeColor = Color.White;
                l2_78.ForeColor = Color.White;
                l2_79.ForeColor = Color.White;
                l2_80.ForeColor = Color.White;
                l2_81.ForeColor = Color.White;

                //
                //
                l2_21.BorderColor = Color.White;
                l2_22.BorderColor = Color.White;
                l2_23.BorderColor = Color.White;
                l2_24.BorderColor = Color.White;
                l2_25.BorderColor = Color.White;
                l2_26.BorderColor = Color.White;
                l2_27.BorderColor = Color.White;
                l2_28.BorderColor = Color.White;
                l2_29.BorderColor = Color.White;
                l2_30.BorderColor = Color.White;
                l2_31.BorderColor = Color.White;
                l2_32.BorderColor = Color.White;
                l2_33.BorderColor = Color.White;
                l2_34.BorderColor = Color.White;
                l2_35.BorderColor = Color.White;
                l2_36.BorderColor = Color.White;
                l2_37.BorderColor = Color.White;
                l2_38.BorderColor = Color.White;
                l2_39.BorderColor = Color.White;
                l2_40.BorderColor = Color.White;
                l2_41.BorderColor = Color.White;
                l2_42.BorderColor = Color.White;
                l2_43.BorderColor = Color.White;
                l2_44.BorderColor = Color.White;
                l2_45.BorderColor = Color.White;
                l2_46.BorderColor = Color.White;
                l2_47.BorderColor = Color.White;
                l2_48.BorderColor = Color.White;
                l2_49.BorderColor = Color.White;
                l2_50.BorderColor = Color.White;
                l2_51.BorderColor = Color.White;
                l2_52.BorderColor = Color.White;
                l2_53.BorderColor = Color.White;
                l2_54.BorderColor = Color.White;
                l2_55.BorderColor = Color.White;
                l2_56.BorderColor = Color.White;
                l2_57.BorderColor = Color.White;
                l2_58.BorderColor = Color.White;
                l2_59.BorderColor = Color.White;
                l2_60.BorderColor = Color.White;
                l2_61.BorderColor = Color.White;
                l2_62.BorderColor = Color.White;
                l2_63.BorderColor = Color.White;
                l2_64.BorderColor = Color.White;
                l2_65.BorderColor = Color.White;
                l2_66.BorderColor = Color.White;
                l2_67.BorderColor = Color.White;
                l2_68.BorderColor = Color.White;
                l2_69.BorderColor = Color.White;
                l2_70.BorderColor = Color.White;
                l2_71.BorderColor = Color.White;
                l2_72.BorderColor = Color.White;
            }
        }

             private void AnChu_Lien3()
             {
                 if (!InCungMau)
                 {
                    l3_1.ForeColor = Color.White;
                    l3_2.ForeColor = Color.White;
                    l3_3.ForeColor = Color.White;
                    l3_4.ForeColor = Color.White;
                    l3_5.ForeColor = Color.White;
                    l3_6.ForeColor = Color.White;
                    l3_7.ForeColor = Color.White;
                    l3_8.ForeColor = Color.White;
                    l3_9.ForeColor = Color.White;
                    l3_10.ForeColor = Color.White;
                    l3_11.ForeColor = Color.White;
                    l3_12.ForeColor = Color.White;
                    l3_13.ForeColor = Color.White;
                    l3_14.ForeColor = Color.White;
                    l3_15.ForeColor = Color.White;
                    l3_16.ForeColor = Color.White;
                    l3_17.ForeColor = Color.White;
                    l3_18.ForeColor = Color.White;
                    l3_19.ForeColor = Color.White;
                    l3_20.ForeColor = Color.White;
                    l3_21.ForeColor = Color.White;
                    l3_22.ForeColor = Color.White;
                    l3_23.ForeColor = Color.White;
                    l3_24.ForeColor = Color.White;
                    l3_25.ForeColor = Color.White;
                    l3_26.ForeColor = Color.White;
                    l3_27.ForeColor = Color.White;
                    l3_28.ForeColor = Color.White;
                 }
             }
             private void AnLine()
             {
                 if (!InCungMau)
                 {
                     line1.ForeColor = Color.White;
                     line2.ForeColor = Color.White;
                 }
             }
             public void loadNgayThangNam()
             {
                 l1_77.Text = Ngay.ToString();
                 l1_78.Text = Thang.ToString();
                 l1_79.Text = Nam.ToString();
                 //
                 l1_80.Text = Ngay.ToString();
                 l1_81.Text = Thang.ToString();
                 l1_82.Text = Nam.ToString();
                 //
                 xrLabel118.Text = Ngay.ToString();
                 xrLabel115.Text = Thang.ToString();
                 xrLabel124.Text = Nam.ToString();
                         //
                 xrLabel110.Text = Ngay.ToString();
                 xrLabel113.Text = Thang.ToString();
                 xrLabel114.Text = Nam.ToString();
                 //
                 xrLabel106.Text = Ngay.ToString();
                 xrLabel92.Text = Thang.ToString();
                 xrLabel90.Text = Nam.ToString();
             }

    }
}
